/**
 * @file	Controller.h
 * @author	Mitch
 * @author 	David
 * @date	May 16, 2009
 *
 * @brief	Main controller for AT90USBKey
 */

#ifndef COMMANDER_H_
#define COMMANDER_H_

#include "Uart.h"
#include "roomba_sci.h"
#include "timer.h"
#include "../radio/radio.h"

#define clock8MHz()    CLKPR = _BV(CLKPCE); CLKPR = 0x00;	// Clock speed
#define STRING_SIZE		8	//can be changed to handle shorter/longer strings
#define TIME_DELAY		200	//200 ms
#define NUM_ARGS_BYTES	4	// The number of bytes taken up by arguments in the roomba commmand (packet.h)

void print_string(char *s);
void init_led();
void init_joystick();
void set_roomba_command(radiopacket_t *packet, uint8_t command, uint8_t arguments[NUM_ARGS_BYTES]);

#endif
